home *** CD-ROM | disk | FTP | other *** search
/ Atari Mega Archive 1 / Atari Mega Archive - Volume 1.iso / language / fools.lzh / README.1ST < prev   
Text File  |  1990-03-02  |  3KB  |  78 lines

  1. Jonathan advertised the existence of his free scheme interpreter on 
  2. comp.lang.scheme. I grabbed a copy and compiled it up under GNU C 
  3. (Thanks to J.Bammi for the GNU C port).
  4.  
  5. It seemed to go OK, a few messages batted back and forth between myself and
  6. Jonathan to fix a few ST peccadillos (output buffer flushing, mainly), so I 
  7. thought I'd make the binary available for Atarians to play with.
  8.  
  9. Firstly, Jonathan's copyright ....
  10.  
  11.  * Copyright 1989 Jonathan Lee.  All rights reserved.
  12.  *
  13.  * Permission to use, copy, and/or distribute for any purpose and
  14.  * without fee is hereby granted, provided that both the above copyright
  15.  * notice and this permission notice appear in all copies and derived works.
  16.  * Fees for distribution or use of this software or derived works may only
  17.  * be charged with express written permission of the copyright holder.
  18.  * This software is provided ``as is'' without express or implied warranty.
  19.  
  20. Right, to business. Fools' lisp is run from GEM or the CLI of your choice with
  21.  
  22. fools init.scm extra.scm
  23.  
  24. if you want the extend-syntax stuff, add macros.scm to the arguments. The file
  25. 'fl' (a csh script) shows how it's done.
  26.  
  27. You'll probably need to read R3RS (Revised3 Report on Scheme) which defines
  28. the R3RS syntax (added with macros.scm - else fools' lisp is not quite R3RS
  29. conformant). 
  30.  
  31. I added a function "cputime" (0 args) which returns CPU ticks. Use it for
  32. benchmarking.
  33.  
  34. Change the searched directory path in "extra.scm" to suit your own set up and
  35. give U**x-style pathnames to the interpreter (thanks Edgar for unx2dos). I
  36. found it useful to have a "src" subdirectory, which I added to the pathnames in
  37. extra.scm, then giving (require 'filename) worked happily, as did (load
  38. "src/filename").
  39.  
  40. It hasn't been exhaustively tested yet and Jonathan advises that there are a
  41. couple of bugfixes (which he'll send me soon), but an R3RS-conformant scheme
  42. interpreter for the ST ain't to be sneezed at!
  43.  
  44. I am advised that the following code is a fair guide to performance:
  45.  
  46. (define (nfib x)
  47.    (if (< x 2)
  48.         1
  49.         (+ (nfib (- x 2)) (nfib (- x 1)) 1)))
  50.  
  51. With the result of the nfib calculation being the number of procedure calls
  52. made (--ish), so choosing a sensible x (try between 15 & 20) and using a
  53. stopwatch (hey, whaddya want, precision, on an ST!!?), you can work out how
  54. fast it goes (--ish).
  55.  
  56. One fine day, I'll make a concerted effort at porting Cscheme, but that's a
  57. tight fit in 2.5Mb, let alone 1Mb. As far as memory goes, this *should* run on
  58. a 520, but no guarantees.
  59.  
  60. Jonathan says that he's going to incorporate the #ifdef atari switches into
  61. the source code, so the ST will continue to receive implicit support, at least.
  62. But he's nominated me to field ST-specific queries, my email address appears
  63. below. 
  64.  
  65. Cheers,
  66.  
  67. Graham
  68. ======
  69.  
  70. ------------------------------------------------------------------
  71. Graham Higgins                 |  Phone: (0272) 799910 x 24060
  72. Hewlett-Packard Labs        |  gray@hpl.hp.co.uk
  73. Bristol                           |  gray%hplb.uucp@ukc.ac.uk
  74. U.K.                              |  gray@hplb.hpl.hp.com
  75. ------------------------------------------------------------------
  76. Disclaimer: My opinions above are exactly that, mine and opinions.
  77. ------------------------------------------------------------------
  78.